﻿using System.Collections;
using System.Collections.Generic;
using YamlDotNet.Serialization;
using YamlDotNet.Serialization.NamingConventions;
using UnityEngine;

public class CameraDoc : DocPrimitive {
	[YamlMember(Alias = "Camera", ApplyNamingConventions = false)]
	public CameraObj co { get; set; }
}

public class CameraObj {

	[YamlMember(Alias = "m_ObjectHideFlags", ApplyNamingConventions = false)]
	public int objectHideFlags { get; set; }

	[YamlMember(Alias = "m_PrefabParentObject", ApplyNamingConventions = false)]
	public Dictionary<string, int> prefabParent { get; set; } 

	[YamlMember(Alias = "m_PrefabInternal", ApplyNamingConventions = false)]
	public Dictionary<string, int> prefabInternal { get; set; }

	[YamlMember(Alias = "m_GameObject", ApplyNamingConventions = false)]
	public Dictionary<string, uint> gameObject { get; set; }

	[YamlMember(Alias = "m_Enabled", ApplyNamingConventions = false)]
	public int enabled { get; set; }

	[YamlMember(Alias = "serializedVersion", ApplyNamingConventions = false)]
	public int version { get; set; }

	[YamlMember(Alias = "m_ClearFlags", ApplyNamingConventions = false)]
	public int clearFlags { get; set; }

	[YamlMember(Alias = "m_BackGroundColor", ApplyNamingConventions = false)]
	public Dictionary<string, float> backgroundColor { get; set; }

	[YamlMember(Alias = "m_NormalizedViewPortRect", ApplyNamingConventions = false)]
	public NormalizedViewPortRectObj viewportRect { get; set; }

	[YamlMember(Alias = "near clip plane", ApplyNamingConventions = false)]
	public float nearClipPlane{ get; set; }

	[YamlMember(Alias = "far clip plane", ApplyNamingConventions = false)]
	public float farClipPlane { get; set; }

	[YamlMember(Alias = "field of view", ApplyNamingConventions = false)]
	public float fieldOfView { get; set; }

	[YamlMember(Alias = "orthographic", ApplyNamingConventions = false)]
	public int orthographic { get; set; }

	[YamlMember(Alias = "orthographic size", ApplyNamingConventions = false)]
	public int orthographicSize { get; set; }

	[YamlMember(Alias = "m_Depth", ApplyNamingConventions = false)]
	public int depth { get; set; }

	[YamlMember(Alias = "m_CullingMask", ApplyNamingConventions = false)]
	public CullingMask cullingMask { get; set; }

	[YamlMember(Alias = "m_RenderingPath", ApplyNamingConventions = false)]
	public int renderingPath { get; set; }

	[YamlMember(Alias = "m_TargetTexture", ApplyNamingConventions = false)]
	public Dictionary<string, int> targetTexture { get; set; }

	[YamlMember(Alias = "m_TargetDisplay", ApplyNamingConventions = false)]
	public int targetDisplay { get; set; }

	[YamlMember(Alias = "m_TargetEye", ApplyNamingConventions = false)]
	public int targetEye { get; set; }

	[YamlMember(Alias = "m_HDR", ApplyNamingConventions = false)]
	public int hdr { get; set; }

	[YamlMember(Alias = "m_AllowMSAA", ApplyNamingConventions = false)]
	public int allowMSAA { get; set; }

	[YamlMember(Alias = "m_ForceIntoRT", ApplyNamingConventions = false)]
	public int forceIntoRT { get; set; }

	[YamlMember(Alias = "m_OcclusionCulling", ApplyNamingConventions = false)]
	public int occlusionCulling { get; set; }

	[YamlMember(Alias = "m_StereoConvergence", ApplyNamingConventions = false)]
	public int stereoConvergence { get; set; }

	[YamlMember(Alias = "m_StereoSeparation", ApplyNamingConventions = false)]
	public float stereoSeparation { get; set; }

	[YamlMember(Alias = "m_StereoMirrorMode", ApplyNamingConventions = false)]
	public int stereoMirrorMode { get; set; }

}

public class NormalizedViewPortRectObj
{
	[YamlMember(Alias = "serializedVersion", ApplyNamingConventions = false)]
	public int serializedVersion { get; set; }

	[YamlMember(Alias = "x", ApplyNamingConventions = false)]
	public int x { get; set; }

	[YamlMember(Alias = "y", ApplyNamingConventions = false)]
	public int y { get; set; }

	[YamlMember(Alias = "width", ApplyNamingConventions = false)]
	public int width { get; set; }

	[YamlMember(Alias = "height", ApplyNamingConventions = false)]
	public int height { get; set; }
};

public class CullingMask
{
	[YamlMember(Alias = "serializedVersion", ApplyNamingConventions = false)]
	public int version { get; set; }

	[YamlMember(Alias = "m_Bits", ApplyNamingConventions = false)]
	public uint bits { get; set; }

};
